<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="{{__PUBLIC__}}/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="{{__PUBLIC__}}/Admin/Flat/img/favicon.ico">


	    <script src="{{__PUBLIC__}}/Home/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/js/hdjs.css"/>
		<script src="{{__PUBLIC__}}/Home/js/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
		<form action="" method="post"  onsubmit="return hd_submit(this,'{{U('Category/edit')}}','{{U('Category/index')}}')">
		<div class="alert alert-success">编辑 {{$cateData['cname']}} 分类</div>
		<div class="form-group">
			<label for="exampleInputEmail1">分类名称</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类名称" required="" name="cname" value="{{$cateData['cname']}}">
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">所属类型</label>
			<select name="type_tid" class="form-control">
				{{foreach from="$typeData" key="$k" value="$v"}}
				<option value="{{$v['tid']}}" {{if value="$v['tid']==$cateData['type_tid']"}} selected="selected" {{endif}}>{{$v['tname']}}</option>
				{{endforeach}}
			</select>
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">所属分类</label>
			<select name="pid" class="form-control">
			{{if value="isset($getData)"}}
				{{foreach from="$getData" key="$k" value="$v"}}
					<option value="{{$v['cid']}}" {{if value="$v['cid']==$cateData['pid']"}} selected="selected" {{endif}}>{{$v['_name']}}</option>
				{{endforeach}}
			{{else}}
				<option value="0">顶级分类</option>
			{{endif}}
			</select>
		</div>
		<div id="">
				<label for="">是否热门</label>
				<br />
				<label class="checkbox checkbox-inline">
					<input id="checkbox1" class="custom-checkbox" type="checkbox" value="1" name="is_hot"  data-toggle="checkbox" {{if value="$cateData['is_hot']==1"}} checked="checked" {{endif}}>
					<span class="icons">
					<span class="icon-unchecked"></span>
					<span class="icon-checked"></span>
					</span>
					热门
				</label>

			</div>
		<div class="form-group">
			<label for="exampleInputEmail1">分类排序</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类排序" required="" name="sort" value="{{$cateData['sort']}}">
		</div>
		
		<input type="hidden" name="cid" value="{{$cateData['cid']}}">
		<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		</form>
	</body>
</html>
